<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateBlindBoxProductsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('blind_box_products', function (Blueprint $table) {
            $table->id();
            $table->timestamps();
            $table->bigInteger('blind_box_id')->index()->comment('肓盒ID');
            $table->bigInteger('inside_product_id')->index()->comment('肓盒中的商品ID');
            $table->integer('quantity')->comment('放入肓盒的商品数量');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('blind_box_products');
    }
}
